<template>
  <div>
    <selectTask
      :courseInfo="courseInfo"
      @changeTask="handleChangeTask"
      @autoScore="handleAutoScore"
    />
    <stuTaskTable
      :courseInfo="courseInfo"
      :currTaskGroupID="currTaskGroupID"
      :currTaskID="currTaskID"
      :studenData="studenData"
      :tableLoading="tableLoading"
      @getStuTaskData="getStuTaskData"
    />
  </div>
</template>

<script>
const selectTask = () => import("./component/selectTask");
const stuTaskTable = () => import("./component/stuTaskTable.vue");
export default {
  components: {
    selectTask,
    stuTaskTable,
  },
  data() {
    return {
      currTaskGroupID: null,
      currTaskID: null,
    };
  },
  props: {
    courseInfo: Object,
    studenData: Array,
    tableLoading: Boolean,
  },
  methods: {
    handleChangeTask(taskGroupID, taskID) {
      this.currTaskGroupID = taskGroupID;
      this.currTaskID = taskID;
    },
    getStuTaskData(params ,fn ,that) {
      this.$emit("getStuTaskData",params ,fn ,that)
    }
  },
};
</script>

<style lang="stylus"></style>